package com.company.service.impl.drinks;

import com.company.service.Drinks;

public class Coke extends Drinks {
    String type;

    public void buy() {
        System.out.println("购买了一杯" + type + "可乐。");
    }


    public Coke(int type) {
        if(type == 1){
            this.type = "可口";
        }else{
            this.type = "百世";
        }
    }
}
